cmake_minimum_required(VERSION 3.22)

project(sdl2-loadImage)

find_package(SDL2 REQUIRED)
include_directories(${SDL2_INCLUDE_DIRS})

set(CMAKE_CXX_STANDARD 11)
set(SOURCES
    main.cpp
)

add_executable(${PROJECT_NAME} ${SOURCES})

target_link_libraries(${PROJECT_NAME} ${SDL2_LIBRARIES})
add_custom_command(
    TARGET sdl2-loadImage
    POST_BUILD
    COMMAND ${CMAKE_COMMAND} -E copy "${PROJECT_SOURCE_DIR}/helloworld.bmp" ${PROJECT_BINARY_DIR}
)

